package ru.kop4en.diplom.figure;

import javax.swing.JPanel;
import java.awt.BorderLayout;
import javax.swing.JButton;

import ru.kop4en.diplom.main.MainWindow;

public class FigurePanel extends JPanel
{
	private static final long serialVersionUID = 1L;
	
	//=============================================================================
	public FigurePanel()
	{
		setLayout(new BorderLayout(0, 0));
		
		JButton btnFigure = new JButton("figure");
		add(btnFigure, BorderLayout.CENTER);
		add(right_panel_, BorderLayout.EAST);
		add(left_panel_, BorderLayout.WEST);
	}

	//=============================================================================
	@Override
	public String getName()
	{
		return "Figure";
	}

	//=============================================================================
	public void addWindowListener(MainWindow mainWindow)
	{
		right_panel_.addNextHandler(mainWindow);
		left_panel_.addPrevHandler(mainWindow);		
	}
	
	// members ===============================================
	private RightFigurePanel right_panel_ = new RightFigurePanel();
	private LeftFigurePanel left_panel_ = new LeftFigurePanel();
}
